﻿using System;

namespace FlickrXplorer.Web.Plugin.Exceptions
{
    /// <summary>
    /// The base type of all exceptions relating to all <see cref="FlickrXplorer.Web.Plugin.FlickrXplorerPlugin" text="FlickrXplorerPlugin" />.
    /// </summary>                                                                                                                             
    public abstract class FlickrXplorerPluginException : Exception
    {
        /// <summary>
        /// Gets or sets the <see cref="FlickrXplorer.Web.Plugin.FlickrXplorerPlugin" text="plugin" />
        /// related to this error.
        /// </summary>                                                                                
        public FlickrXplorerPlugin Plugin { get; private set; }

        public FlickrXplorerPluginException(FlickrXplorerPlugin plugin, string message)
            : base(message)
        {
            this.Plugin = plugin;
        }

        public FlickrXplorerPluginException(FlickrXplorerPlugin plugin, string message, Exception innerException)
            : base(message, innerException)
        {
            this.Plugin = plugin;
        }
    }
}